//
//	File: D3D9Config.h
//
#ifndef OYD3D9CONFIG_H
#define OYD3D9CONFIG_H

class COyD3D9Config
{
private:

	COyD3D9Config() 
	{
		m_VSShaderVer = m_PSShaderVer = m_MaxVSShaderVer = m_MaxPSShaderVer = m_MaxVSShaderConst = 0;
		m_GlobalAmbientColor = 0;
	}

	//copy ctor and assignment should be private
	COyD3D9Config(const COyD3D9Config&);
	COyD3D9Config& operator=(const COyD3D9Config&);


public:
	//this is a singleton
	static COyD3D9Config* GetInstance();

	void SetGlobalAmbientColor(unsigned int color) { m_GlobalAmbientColor = color; }
	void SetShaderVersion(unsigned int VSVer, unsigned int PSVer);
	void SetVertexShaderConst(unsigned int num) { m_MaxVSShaderConst = num; }
	bool IsEnableShader() { 
		if(m_VSShaderVer == 0 || m_PSShaderVer == 0)
			return false;
		else
			return true;
	}

	unsigned int m_VSShaderVer;
	unsigned int m_PSShaderVer;
	unsigned int m_MaxVSShaderVer;
	unsigned int m_MaxPSShaderVer;
	unsigned int m_MaxVSShaderConst;
	unsigned int m_GlobalAmbientColor;
};

#define	GetOyD3D9Config()	COyD3D9Config::GetInstance()

#endif